import { reactive, ref } from "vue";

export function useCheckbox(){
  //v-model绑定的值不能是reactive的，用ref的
  const checkVal = ref(true);
  const checkVal2 = ref(['上海','深圳']);
  const checks = ref(['上海','北京','天津','深圳']);
  const checkboxChange = (val)=>{
    console.log(val)
  }
  const checkVal1 = reactive({a:false})//这种情况可以用reactive
  return {
    checkVal,
    checkVal1,
    checkboxChange,

    checkVal2,
    checks
  }
}